/**
 * 机构表单
 */
import { ref } from 'vue'
import { FormItemProps } from '../../../components/base/form-item/props/index'
import { Dept } from '../../../entity/system/dept'
export const formItems = ref<Array<FormItemProps<Dept>>>([
  {
    type: 'input',
    name: 'name',
    label: '机构名称',
    placeholder: '机构名称',
    required: true,
    rules: [{ required: true, message: '请输入机构名称' }],
  },
  {
    type: 'cascader',
    name: 'parentId',
    label: '上级机构',
    placeholder: '上级机构',
    params: {
      options: [],
      fieldNames: {
        label: 'name',
        value: 'id',
        children: 'children',
      },
    },
  },
  {
    type: 'select',
    name: 'sysRoleDept',
    label: '机构角色',
    placeholder: '机构角色',
    params: {
      options: [],
      mode: 'multiple',
      fieldNames: { label: 'name', value: 'id' },
    },
  },
  {
    type: 'input-number',
    name: 'orderNum',

    label: '排序',
    placeholder: '排序',
  },
])
